#ifndef OBBRICK_H
#define OBBRICK_H

#include "d3dx9.h"
#include "ObStatic.h"
#include "BrickKBoom.h"
#include <vector>

class ObBrick : public ObStatic{
public:
	enum BRICK { BRICK1_BR = 1, BRICK1_GR, BRICK1_NBR, BRICK2_BR, BRICK2_GR, BRICK2_NBR, BRICK3_BR, BRICK3_GR, BRICK3_NBR };

	ObBrick();
	ObBrick(BRICK nid);
	~ObBrick();

	bool setId(int nid);
	static bool checkType(int obID);

	void collidedWith(ObObject* object, CollisionRS rs);
	void update(float dt);
	void render(ID3DXSprite* mSprite);
	bool getCanKill();
	void setCanKill(bool cankill);

	static bool loadTexture();
	static bool releaseTexture();

private:
	static	IDirect3DTexture9* mTex;
	static CSound* sBreak;

	D3DXVECTOR3 mOldPos;
	float	delaycount;
	float	cankilldelay;
	float	jumpcount;
	std::vector<BrickKBoom*> mBoomlist;
	bool	mCankill;
	
};
#endif